OculusQuest 開発 2020年ごろの情報
from OculusQuest 開発 スタートガイド
OculusQuest 開発 2020年ごろの情報
開発環境構築
https://developer.oculus.com/documentation/unity/book-unity-gsg/
テスト環境構築
https://developer.oculus.com/documentation/unity/unity-enable-device/
adb devicesが通らない
パスが通ってない
AndroidSDKをUnity経由でインストールした場合は、この辺にある
C:\Program Files\Unity\Hub\Editor\2019.4.11f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools
テストアプリのインストール
adb install -r /Users/username/Unity-Sample-Projects/ballgame/playgame.apk
OculusSDKのインストール
https://developer.oculus.com/documentation/unity/unity-import/
プロジェクト設定
https://developer.oculus.com/documentation/unity/unity-conf-settings/
XR Settings (XR設定)を展開し、Virtual Reality Supported (バーチャルリアリティのサポート)を選択します。バーチャルリアリティSDKの下に、Oculusが表示されているはずです。
チェックが出来ない
https://gyazo.com/34d18106b80af2a8946211bceeff5f8b
少なくとも、この手順は2019.4では非推奨
https://xrdnk.hateblo.jp/entry/2020/03/24/002006
代わりに XR Plug-in Management を使用する
d.アプリのリリースバージョンでのエラーチェックをスキップするため、Low Overhead Mode (低オーバーヘッドモード)を選択します。これは、OpenGL ES APIを使用するアプリに適用されます。
設定が見つからない
Edit -> Project Settings -> Player ではなく Edit -> Project Settings -> XR Plug-in Management に存在する
サンプルゲームの作成
https://developer.oculus.com/documentation/unity/unity-tutorial/
b.Add Component (コンポーネントの追加) > New Script (新しいスクリプト)をクリックし、名前をPlayerControllerに設定してから、Create and Add (作成して追加)をクリックします。
PlayerControllerは既にある(多分StandardAssetsの影響?)と言われて作成できない
とりあえずMyPlayerControllreにして進めてみる
作ってみたものの、起動しない
Questを再起動したら動いた
意味わからん
その他参考資料
https://docs.unity3d.com/ja/current/Manual/configuring-project-for-xr.html
https://framesynthesis.jp/tech/unity/oculusquest/
ここの方が情報が新しい。かも